package com.zzg.srb.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
/**
 * @ToString
 */
public enum BorrowerStatusEnum {

    /**
     * 未认证
     */
    NO_AUTH(0, "未认证"),

    /**
     * 认证中
     */
    AUTH_RUN(1, "认证中"),

    /**
     * 认证成功
     */
    AUTH_OK(2, "认证成功"),

    /**
     * 认证失败
     */
    AUTH_FAIL(-1, "认证失败"),
    ;


    private Integer status;

    private String msg;

    public static String getMsgByStatus(int status) {
        BorrowerStatusEnum[] arrObj = BorrowerStatusEnum.values();
        for (BorrowerStatusEnum obj : arrObj) {
            if (status == obj.getStatus()) {
                return obj.getMsg();
            }
        }
        return "";
    }
}

